package com.boot.controller;

import com.boot.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @Auther: zhengshunzhi
 * @Date: 2018/8/30 11:24
 * @Description: 用户控制器
 */
@Api(value = "UserController", description = "用户界面接口")
@Controller
public class UserController {

    @Autowired
    private UserService userService;

    @ApiOperation(value="用户添加", notes="用户添加接口")
    @GetMapping(value = "/user/add")
    @RequiresPermissions(value = "user:add")
    public String add() {
        return "/user/add";
    }

    @GetMapping(value = "/user/update")
    @RequiresPermissions(value = "user:update")
    public String update() {
        return "/user/update";
    }

    @GetMapping(value = "/user/delete")
    @RequiresPermissions(value = "user:delete")
    public String delete() {
        return "/user/delete";
    }

    @GetMapping(value = "/user/query")
    @RequiresPermissions(value = "user:query")
    public String query() {
        return "/user/query";
    }
}
